<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>require</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.return.html">return</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.include.html">include</a></div>
 <div class="up"><a href="language.control-structures.html">流程控制</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.require" class="sect1">
 <h2 class="title">require</h2>
 <p class="verinfo">(PHP 4, PHP 5)</p>

 <p class="para">
  <em>require</em> 和 <span class="function"><a href="function.include.html" class="function">include</a></span>
  几乎完全一样，除了处理失败的方式不同之外。<span class="function"><strong>require</strong></span>
  在出错时产生 <strong><code>E_COMPILE_ERROR</code></strong>
  级别的错误。换句话说将导致脚本中止而 <span class="function"><a href="function.include.html" class="function">include</a></span>
  只产生警告（<strong><code>E_WARNING</code></strong>），脚本会继续运行。
 </p>
 <p class="para">
  参见 <span class="function"><a href="function.include.html" class="function">include</a></span> 文档了解详情。
 </p>
</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.return.html">return</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.include.html">include</a></div>
 <div class="up"><a href="language.control-structures.html">流程控制</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
